package com.usefullc.crawler.param;
import com.baomidou.mybatisplus.annotation.TableField;
import com.usefullc.common.domain.BaseDomain;
import com.usefullc.common.enums.ValidTypeEnum;
import com.usefullc.system.service.component.extend.ApiField;
import com.usefullc.system.validator.UsefulPropertyVerify;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 爬虫活动参数实体
 * @author: 星空
 * @date: 2022-07-27
 */
@ApiModel
@Data
public class ActiveParam extends BaseDomain {

//useful_auto_generate_section_start

    @UsefulPropertyVerify(required=true)
    @ApiModelProperty(notes = "模板")
    private Long templateId;

    @UsefulPropertyVerify(min=-2147483648, max=2147483647, required=true)
    @ApiModelProperty(notes = "状态")
    private Integer status;

    @UsefulPropertyVerify()
    @ApiModelProperty(notes = "ID")
    private Long id;

    @UsefulPropertyVerify(minLen=1, required=true, maxLen=50)
    @ApiModelProperty(notes = "名称")
    private String name;

    @UsefulPropertyVerify(minLen=1, required=true)
    @ApiModelProperty(notes = "请求url")
    private String url;

    @UsefulPropertyVerify(minLen=1, maxLen=255)
    @ApiModelProperty(notes = "请求方法")
    private String method;

    @UsefulPropertyVerify(min=0, max=100, required=true)
    @ApiModelProperty(notes = "序号")
    private Integer orderNo;

    @UsefulPropertyVerify(min=-2147483648, max=2147483647, required=true)
    @ApiModelProperty(notes = "请求类型")
    private Integer requestType;

    @UsefulPropertyVerify(minLen=2, required=true, maxLen=10)
    @ApiModelProperty(notes = "selenium驱动类型")
    private String webDriverType;

    @UsefulPropertyVerify(minLen=1)
    @ApiModelProperty(notes = "等待css选择表达式")
    private String waitCssSelectorExpress;

    @UsefulPropertyVerify(minLen=1)
    @ApiModelProperty(notes = "html提取解析表达式")
    private String analyseExpress;

    @UsefulPropertyVerify(minLen=1)
    @ApiModelProperty(notes = "解析屏蔽表达式")
    private String analyseBanExpress;

    @UsefulPropertyVerify(minLen=1)
    @ApiModelProperty(notes = "解析切换代理表达式")
    private String switchProxyExpress;

    @UsefulPropertyVerify(minLen=2, maxLen=3000)
    @ApiModelProperty(notes = "Cookie")
    private String cookie;


    @ApiModelProperty(notes = "提取数据的url")
    private String extractDataUrl;


    @ApiModelProperty(notes = "UI事件脚本")
    private String uiEventScript;

    @ApiModelProperty(notes = "分片活动（0否，1是）")
    private Integer sliceActive;


    @ApiModelProperty(notes = "Html提取表达式类型（0 静态；1 动态）")
    private Integer analyseExpressType;


    @ApiModelProperty(notes = "变量")
    private String variables;

//useful_auto_generate_section_end

    @ApiModelProperty(notes = "脏数据css选择表达式")
    private String dirtyCssSelectorExpress;

    @ApiModelProperty(notes = "运行超时时间")
    private Integer runTimeout;


    @ApiModelProperty(notes = "请求body")
    @TableField(value = "`requestBody`")
    private String requestBody;

    @ApiModelProperty(notes = "请求头部")
    @TableField(value = "`requestHeaders`")
    private String requestHeaders;
}
